<html>
<head>
<?php
session_start();
if (isset($_POST['submit']))
{
  
  $name = $_POST['username'];
  $psw = $_POST['password'];
  $un = 'admin';
  $pw = '123';
  

 if ($un == $name && $pw == $psw)
{
$_SESSION['username'] = $name;
   header("location:index.php"); 

}
else
{

   echo ("<script type='text/javascript'>alert('Login Failed. User name or password incorrect.'); </script>");
   include("index.php");
}

}

?>
</head>
<body>

</body>
</html>